server {
       listen 80;
       server_name <YOUR-DOMAIN>;
        location / {
    return 301 https://$http_host$request_uri;
  }

}

server {
    listen 443 ssl http2;
    server_name <YOUR-DOMAIN>;

    ssl_certificate /opt/ssl/<YOUR-DOMAIN>.pem;
    ssl_certificate_key /opt/ssl/<YOUR-DOMAIN>.key;

    auth_basic           "Administrator's Area";
    auth_basic_user_file /etc/nginx/.auth/.subme.htpasswd;

    location / {
        proxy_redirect off;
        proxy_pass http://127.0.0.1:53000;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $http_host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }

    location /s {
        auth_basic off;
        proxy_redirect off;
        proxy_pass http://127.0.0.1:53000/s;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $http_host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }
}